package com.py.credit.service;

import java.util.List;
import java.util.Map;

import org.springframework.web.multipart.commons.CommonsMultipartFile;

import com.py.credit.entity.Account;
import com.py.credit.entity.Element;
import com.py.credit.entity.Organization;
import com.py.credit.entity.Personnel;
import com.py.framework.core.common.Page;

public interface OrgService {

	public String addOrg(Organization org, Account account, CommonsMultipartFile businessLicenceFile,
			CommonsMultipartFile commitmentLetterFile, CommonsMultipartFile orgCodeCertificateFile,
			CommonsMultipartFile taxRegisterLicenceFile, CommonsMultipartFile accountCertificateFile,
			CommonsMultipartFile regulatorFile, CommonsMultipartFile orgCrSample) throws Exception;

	public void modifyOrg(Organization org, CommonsMultipartFile businessLicenceFile,
			CommonsMultipartFile commitmentLetterFile, CommonsMultipartFile orgCodeCertificateFile,
			CommonsMultipartFile taxRegisterLicenceFile, CommonsMultipartFile accountCertificateFile,
			CommonsMultipartFile regulatorFile, CommonsMultipartFile orgCrSample) throws Exception;

	public void addPersonnel(Personnel personnel, CommonsMultipartFile idCardFPic, CommonsMultipartFile idCardBPic,
			CommonsMultipartFile certificationPic) throws Exception;

	public void modifyPersonnel(Personnel personnel, CommonsMultipartFile idCardFPic, CommonsMultipartFile idCardBPic,
			CommonsMultipartFile certificationPic) throws Exception;

	public void addElement(CommonsMultipartFile sysLogo, CommonsMultipartFile scalingSysLogo, String orgId)
			throws Exception;

	public void modifyElement(CommonsMultipartFile sysLogo, CommonsMultipartFile scalingSysLogo, String orgId)
			throws Exception;

	public List<Map<String, Object>> getOrgListByConditionForPage(String orgId, List<String> showColumns,
			String[] additionalColumns, String condition, Page page);

	public Map<String, Object> getDetail(String orgId);

	public List<Personnel> getPersonnels(String orgId, String personnelTypeManager);

	public void addAcccount(Account ac);

	public void deleteAccount(String accountId);

	public void updateAccount(String accountId, String status);

	public boolean isSuspendedAccount(String accountId);

	public void resetAccount(String accountId, String password);

	public List<Map<String, Object>> getAccountListByConditionForPage(String orgId, List<String> showColumns,
			String[] additionalColumns, String condition, Page page);

	public byte[] getPic(String imagePath) throws Exception;

	public Personnel getPersonnelById(String perId);

	public Organization getOrgById(String id);

	public Account getAccount(String userName, String password);

	public List<Organization> getOrgList(String name);

	public List<Organization> getOrgListForPage(String name, Page page, String modelId);

	public void addModelOrg(String[] modelIds, String[] orgIds, String type);

	public List<Map<String, Object>> getOrgListByModelIdForPage(String modelId, String orgName, Page page);

	public List<Map<String, Object>> getModelListByOrgIdForPage(String orgId, String modelName, Page page);

	public List<Map<String, Object>> getActivityByConditionForPage(List<String> showColumns, String[] additionalColumns,
			String condition, Page page, String orgId, String checkType);

	public Element getElement(String orgId);

	public void deletePersonnels(String id);

	public void batchAddModelOrg(String[] modelIds);

	public void batchAddOrgModel(String[] orgIds);

	public void batchReleaseModelOrg(String[] modelIds);

	public void batchReleaseOrgModel(String[] orgIds);

	public void releaseOneOrgModel(String orgId, String[] modelIds);

	public void releaseOneModelOrg(String modelId, String[] orgIds);

	public void addAccountAct(String accountId, String chekType);

	boolean isAccountExist(String account);

	public List<String> getAccountAct(String accountId);

	void updatePassword(String accountId, String password);

	Account select(String accountId);

	public boolean modelHasProcess(String modelId, String[] orgIds);

	public boolean orgHasProcess(String orgId, String[] modelIds);

}
